﻿using System.Windows;
using System.Windows.Controls;
using System.Windows.Media;
using System.Windows.Media.Animation;

namespace YAWD.Windows
{
    public partial class MessageBoxYesNo
    {
        public MessageBoxYesNo(string message, bool showNo, bool isError)
        {
            InitializeComponent();
            MessageText.Text = message;
            if (showNo == false)
            {
                Cancel.Visibility = Visibility.Collapsed;
                Ok.SetValue(Grid.ColumnSpanProperty, 2);
            }

            if (isError)
                MessageText.Foreground = new SolidColorBrush(Colors.Red);
        }

        private void Ok_Click(object sender, RoutedEventArgs e)
        {
            DialogResult = true;
        }


        private void Cancel_Click(object sender, RoutedEventArgs e)
        {
            DialogResult = false;
        }

    }
}
